import request from '@/utils/request';

//获取全部学期信息
export const getSemester = () => {
  return request({
    method: 'GET',
    url: '/admin/expschedule/semester/auth/get',
  })
}

//根据 学期Id 获取学期信息
export const getSemesterById = (id) => {
  return request({
    method: 'GET',
    url: `/admin/expschedule/semester/auth/get/${id}`,
  })
}

//设置主学期
export const setMainSemester = (id) => {
  return request({
    method: 'POST',
    url: `/admin/expschedule/semester/auth/set/${id}`,
  })
}

//修改学期信息
export const editSemester=(data)=>{
  return request({
    method:'POST',
    url:'/admin/expschedule/semester/auth/update',
    data
  })
}

//添加学期信息
export const addSemester=(data)=>{
  return request({
    method:'POST',
    url:'/admin/expschedule/semester/auth/save',
    data
  })
}

//删除学期信息
export const deleteSemester=(id)=>{
  return request({
    method:'DELETE',
    url:`/admin/expschedule/semester/auth/remove/${id}`,
  })
}